<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>

        // 1. super 跟 this 很像
        // this 指向调用的对象，super 指向其调用对象的原型

        /*
            super 关键字只能在对象的简写方法中使用
            super 关键字不能单独输出
        */

        const uname = 'window对象';
        const obj = {
            uname: 'obj对象',
            fn() {
                console.log('this指向：' + this.uname);
                console.log('super指向：' + super.uname);
            }
        }
        obj.__proto__.uname = 'obj的原型对象';

        obj.fn();


    </script>
</body>

</html>